home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / RGASM.RAR / ASMCODE.EXE / CHAPT1-5 / FIRST2.ASM < prev    next >
Encoding:
Assembly Source File  |  1993-05-10  |  925 b   |  35 lines

  1. ;
  2. ;       Program First2
  3. ;
  4. .MODEL   SMALL
  5. .CODE
  6.          INCLUDE  MACLIB.INC
  7. Begin:   MOV      BX,0
  8.          InpInt   BX                           
  9.          MOV      CX,BX
  10.          InpInt   BX
  11.          PUSH     CX       ; place first argument onto stack
  12.          PUSH     BX       ; place second argument onto stack
  13.          CALL   AddShow
  14. Finish:  MOV      AX,4C00h
  15.          INT      21h         
  16. ;--------------------------
  17. ;   Procedure section
  18. ;--------------------------
  19. AddShow  PROC              ; adds summands and  display results 
  20.          PUSH     BP       ; Save BP
  21.          MOV      BP,SP    ;       
  22.          MOV      CX,[BP+6]
  23.          MOV      BX,[BP+4]
  24.          ADD      BX,CX
  25.          OutInt   BX
  26.          POP      BP
  27.          RET      4
  28. AddShow  ENDP
  29. ;---------------------------
  30. ;End of Procedure Section
  31. ;---------------------------
  32. .DATA
  33. .STACK
  34.          END      Begin
  35.